﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bzure.Common.Core;

namespace Bzure.Common.Data
{
    public static class PersistenceExtensions
    {
        public static IPersistenceState MarkPersistenceState(this IPersistenceState entity, bool IsPersisted)
        {
            entity.MarkPersistenceState(IsPersisted);
            return entity;
        }
        public static T MarkPersistenceState<T>(this T entity, bool IsPersisted) where T : IPersistenceState
        {
            entity.MarkPersistenceState(IsPersisted);
            return entity;
        }
    }
}
